cmake_minimum_required(VERSION 3.11)

project(LOP)
include(CTest)

if(TARGET SCIP::SCIP)
  # find package by SCIP PATH
  find_package(SCIP CONFIG PATHS ${SCIP_BINARY_DIR} REQUIRED)
else()
  find_package(SCIP REQUIRED)
endif()

include_directories(BEFORE PUBLIC ${SCIP_INCLUDE_DIRS})

add_executable(lop
   src/cmain.c
   src/cons_lop.c
   src/reader_lop.c)

target_link_libraries(lop ${SCIP_LIBRARIES})
target_compile_options(lop PRIVATE ${SCIP_COMPILE_FLAGS})

if( TARGET examples )
    add_dependencies( examples lop )
endif()

add_subdirectory(check)
enable_testing()
